package com.msxt.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.msxt.dto.ZaixiankefuDTO;
import com.msxt.dto.ZaixiankefuEntity;
import com.msxt.view.ZaixiankefuView;
import com.msxt.vo.ZaixiankefuVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ZaixiankefuDao extends BaseMapper<ZaixiankefuEntity> {

	ZaixiankefuDTO selectZaixiankefuWithMessages(@Param("id") Long id);

	// 添加设置 group_concat_max_len 的方法
	@Update("SET SESSION group_concat_max_len = #{len}")
	void setGroupConcatMaxLen(@Param("len") int len);

	List<ZaixiankefuVO> listVO(@Param("ew") QueryWrapper<ZaixiankefuEntity> wrapper);
	ZaixiankefuVO selectVO(@Param("ew") QueryWrapper<ZaixiankefuEntity> wrapper);
	List<ZaixiankefuView> listView(@Param("ew") QueryWrapper<ZaixiankefuEntity> wrapper);
	List<ZaixiankefuView> listView(Page<ZaixiankefuView> page, @Param("ew") QueryWrapper<ZaixiankefuEntity> wrapper);
	ZaixiankefuView selectView(@Param("ew") QueryWrapper<ZaixiankefuEntity> wrapper);
	IPage<ZaixiankefuView> selectPageView(Page<ZaixiankefuView> page, @Param("ew") QueryWrapper<ZaixiankefuEntity> wrapper);
}